<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('标签列表')" />
</head>
<body class="gray-bg">
    
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>

							<li>
								标签ID：<input type="text" name="lableId"/>
							</li>
							<li>
								标签类型：<input type="text" name="lableType"/>
							</li>

							<li>
								是否低电：<select name="isLow" th:with="type=${@dict.getType('sys_is_low')}">
								<option value="">所有</option>
								<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
							</select>
							</li>

							<li>
								在线情况：<select name="isOnline" th:with="type=${@dict.getType('sys_is_online')}">
								<option value="">所有</option>
								<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
							</select>
							</li>
							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>
			
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:lable:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:lable:remove')}]];
        var prefix = ctx + "system/lable";

        $(function() {
			$('input:not([autocomplete]),textarea:not([autocomplete]),select:not([autocomplete])').attr('autocomplete', 'off');
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "标签",
		        showExport: true,
                columns: [{
		            checkbox: true
		        },
				{
					field : 'lableId',
					title : '标签ID',
					sortable: true,
					visible: false
				},
				{
					title: "序号",
					formatter: function (value, row, index) {
						return $.table.serialNumber(index);
					}
				},
				{
					field : 'lableId', 
					title : '标签ID',
					sortable: true,
					visible: true
				},
				{
					field : 'modelType',
					title : '标签类型',
					sortable: true
				},
				{
					field : 'modelNumber',
					title : '标签型号',
					sortable: true
				},
				]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>